package com.jrfid.smartcabinet.demo.db.dao

import androidx.lifecycle.LiveData
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Query
import com.jrfid.smartcabinet.demo.db.entity.AccountInfoEntity

@Dao
interface AccountInfoDao : BaseDao<AccountInfoEntity> {

    @Query("select * from AccountInfoEntity where account = :account limit 1")
    fun findByAccount(account: String): AccountInfoEntity?

    @Query("delete from AccountInfoEntity")
    fun deleteAll()
}